<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <script>
        let obj1 = {
            name:'yanzhen',
            age:10
        }
        console.log(Object.entries(obj1));
        // map容器 无序的key 不重复的key-value集合
        let map1 = new Map([['name','yanzhen'],['age',10]]);

        console.log(map1);
        console.log(map1.entries());
        // 遍历
        map1.forEach((item,index)=>{
            console.log(item,index);
        })
        // 获取
        console.log(map1.get('name'))
        // 判断是否有该属性有true 没有就是false
        console.log(map1.has('name'));
        // set
        map1.set('sex','nan');
        console.log(map1);
    </script>
</body>
</html>